package cn.source.web.controller.db;

import cn.source.common.core.domain.AjaxResult;
import cn.source.zk.domain.dto.DbAllIndicatorsDTO;
import cn.source.zk.domain.result.DynamicTableDataResult;
import cn.source.zk.service.IDBAllIndicatorsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 展示基础表，谐波次数表，简谐波表的字段
 */
@RestController
@RequestMapping("/db/all")
public class DBAllIndicatorsController {

    @Autowired
    private IDBAllIndicatorsService allIndicatorsService;

    @GetMapping()
    public AjaxResult  getAllIndicators(DbAllIndicatorsDTO dbAllIndicatorsDTO){

        // List<Map<String, Object>> list = allIndicatorsService.getTransposedData(dbAllIndicatorsDTO);
        DynamicTableDataResult allTablesData = allIndicatorsService.getAllTablesData(dbAllIndicatorsDTO);

        return AjaxResult.success(allTablesData);
    }

}
